extends ../layouts/home
include ./partials/postedUnder

block main
	.overview.clearfix.wrapper.blog

		each post in posts
			a(href="/blog/#{post.permalink}")
				h2 #{post.title}

			small
				space = ""
				| Written by #{post.author} on #{dateable(post.date, "D MMMM YYYY")}
				mixin postedUnder(post.tags)
				a(href="http://mootools.net/blog/#{post.permalink}/#disqus_thread", data-disqus-identifier).comments
					| Comments

			.post.short
				| !{post.summary}

			hr

		div.pagination.clearfix
			if nextPage
				if tag
					a.older(href="/blog/category/#{tag}/page/#{nextPage}")
						span.icon.previous
						| Older Entries
				else
					a.older(href="/blog/page/#{nextPage}")
						span.icon.previous
						|Older Entries

			if previousPage
				if tag
					a.newer(href="/blog/category/#{tag}/page/#{previousPage}")
						span.icon.next
						| Newer Entries
				else
					a.newer(href="/blog/page/#{previousPage}")
						span.icon.next
						| Newer Entries

	include ../partials/disqus_count
